<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/5/22
 * Time: 10:34
 */
header('Content-Type:application/json');
include '../classes/logincheck.php';
include '../classes/conn.php';
if(islogin()!='teacher_login') {
    die("error");
}
$query="select name from teacher where num='{$_SESSION['t_num']}'";
$res=mysql_query($query);
$row=mysql_fetch_assoc($res);
$data=array('num'=>$_SESSION['t_num'],'name'=>$row['name']);
$data=json_encode($data);
echo $data;